Credible Compilation with Pointers

نویسندگان

  • Martin C. Rinard
  • Darko Marinov
چکیده

This paper presents the formal foundations and architectural design of a credible compiler, or a compiler that, in addition to a transformed program, produces a proof that the transformed program correctly implements the original input program. In our design, programs are represented using a standard low-level intermediate form based on controlow graphs. The compiler is structured as a set of components. Each component performs a speci c transformation and produces a proof that the transformation is correct. Typically, the correctness proof will consist of two subproofs: a subproof that the analysis of the input program produced a correct result, and a subproof that establishes a simulation relation between the original and transformed programs. The paper presents two logics, one for each kind of subproof, and shows that the logics are sound. A novel and important feature of our framework is its simultaneous support for both formal reasoning and sophisticated compiler transformations that deal with the program and the target machine at a very low level. In particular, our logics allow the compiler to prove the correctness of lowlevel optimizations such as register allocation and instruction scheduling even in the presence of potentially aliased pointers into the memory of the machine.

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Montana Smart Pointers: They're Smart, and They're Pointers

The Montana C++ programming environment provides an API interface to the compiler, which allows the compilation process to be extended through programmer-supplied tools. This paper investigates the feasibility of that interface, using smart pointers as an example. Smart pointers are a powerful feature of the C++ language that enable a variety of applications, such as garbage collection, persist...

متن کامل

Credible Compilation

This paper presents an approach to compiler correctness in which the compiler generates a proof that the transformed program correctly implements the input program. A simple proof checker can then verify that the program was compiled correctly. We call a compiler that produces such proofs a credible compiler, because it produces veri able evidence that it is operating correctly.

متن کامل

Credible Compilation by Darko Marinov

This thesis describes a theoretical framework for building compilers that generate formal guarantees that they work correctly. Traditional compilers provide no such guarantees-given an original source program, a traditional compiler generates only a transformed executable program. The only way to investigate the correctness of a compilation is to run the transformed program on some sample input...

متن کامل

Crellvm: Verified Credible Compilation for LLVM

Production compilers such as GCC and LLVM are large complex software systems, for which achieving a high level of reliability is hard. Although testing is an effective method for finding bugs, it alone cannot guarantee a high level of reliability. To provide a higher level of reliability, many approaches that examine compilers’ internal logics have been proposed. However, none of them have been...

متن کامل

A Concrete Memory Model for CompCert

Semantics preserving compilation of low-level C programs is challenging because their semantics is implementation defined according to the C standard. This paper presents the proof of an enhanced and more concrete memory model for the CompCert C compiler which assigns a definite meaning to more C programs. In our new formally verified memory model, pointers are still abstract but are nonetheles...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 1999